/*LICENSE_BEGIN
 * ******************************************************************
 * Copyright 2006 by the Dainamite Robocup-Team at the
 * DAI-Labor, TU-Berlin (www.dai-labor.de)
 * 
 * Members of Dainamite are:
 * Holger Endert
 * Robert Wetzker
 * Thomas Karbe
 * Axel Heßler
 * Philippe Bütter
 * Felix Brossmann
 * 
 * Licensed under the GNU GPL (General Public License) Free Software 
 * License, Version 2. You may use this file only in compliance with 
 * the License. You may obtain a copy of the License at:
 * 
 * http://www.fsf.org/licensing/licenses/gpl.txt
 * ******************************************************************
LICENSE_END*/
package robocup.component.infotypes;

import robocup.component.ControllerNumbers.PLAY_MODE;

/**
 * This info represents a referee-message, by which a new play-mode is 
 * announced.
 */
public class PlayModeInfo extends AuralInfo {

	/**
	 * The new play-mode.
	 */
	private PLAY_MODE playMode = PLAY_MODE.UNKNOWN;

	/**
	 * An info-object containing a new PlayMode
	 * 
	 * @param iCycle -
	 *            the time of the new playmode
	 * @param iPlayMode -
	 *            which playmode
	 */
	public PlayModeInfo(int iCycle, PLAY_MODE iPlayMode) {
		super(iCycle);
		this.playMode = iPlayMode;
	}

	/**
	 * Sets the new play-mode for this info-object.
	 * @param playMode
	 */
	public void setPlayModeType(PLAY_MODE playMode) {
		this.playMode = playMode;
	}

	/**
	 * Returns the PlayMode transmitted through the info message
	 */
	public PLAY_MODE getPlayModeType() {
		return this.playMode;
	}


	/**
	 * @return Returns a debug-string for this info-object.
	 */
	@Override
	public String toString() {
		String s = "PLAY_MODE_";
		s += this.playMode.toString();
		return s;
	}
}
